package com.input4hua.observer;

import com.input4hua.observer.observer.ObserverImp;
import com.input4hua.observer.subject.SubjectImp;

/**
 * Created by jiahua.hu on 2019/2/16.
 */
public class Main {
    public static void main(String[] args) {
        SubjectImp subject = new SubjectImp();

        ObserverImp observer1 = new ObserverImp();

        subject.addObserver(observer1);

        ObserverImp observer2 = new ObserverImp();

        subject.addObserver(observer2);

        subject.doSomething();
    }
}
